#include <stdio.h>
#include <math.h>
#include <time.h>
void main()
{
	  int a[100];
	  float b[100];
	int max1=0,min1=a[0]=100,i=0,j=0,mount1=0;
	float max2=0.0,min2=b[0]=1,mount2=0.0;
	float ave1,ave2;
	srand((unsigned)time(NULL));
	for(;i<100;i++)
	{
		int tmp=rand()%1000;
		for(j=0;j<i;j++)
		{
			if(tmp==a[i])
			{
				tmp=rand()%1000;
				j=0;
			}
		}
	  a[i]=tmp;
	  if(a[i]!=0)
	  b[i]=1.0/a[i];
	else b[i]=0;
	mount1+=a[i];
	mount2+=b[i];
	if(max1<a[i])
	max1=a[i];
	else
	if(max2<b[i])
	max2=b[i];

	else
	if(min1>a[i])
	min1=a[i];
	else
	if(min2>b[i])
	min2=b[i];

	 }
	ave1=mount1/100;
	ave2=mount2/100.0;
	for(j=0;j<100;j++)
	{
	  printf("%d %d %.2f\n",j+1,a[j],b[j]);


	}printf("max %d %.2f\n",max1,max2);
	printf("min %d %.2f\n",min1,min2);
	printf("ave %.1f %.2f\n",ave1,ave2);
}
         
